package com.zsc.externalservice.mapper;

import com.zsc.externalservice.entity.AdsSjzlXsSalOrderdtl;
import com.zsc.externalservice.entity.MySQLDateResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.sql.Date;
import java.time.LocalDate;
import java.util.List;

@Mapper
public interface OrderMapper {

    /**
     * 获取用户的订单信息
     * @param custUuid 用户uuid
     * @return List
     */
    List<AdsSjzlXsSalOrderdtl> getByCustUuid(String custUuid , LocalDate date);

    /**
     * 获取最近一次的下单时间
     * @param customUuid
     * @return
     */
    MySQLDateResult getLastOrderDate(String customUuid);

//    /**
//     * 根据用户uuid获取最近的一次订单数据
//     * @param customUuid
//     * @param date
//     * @return
//     */
//    @Select("select product_code from ADS_SJZL_XS_SAL_ORDERDTL where customer_uuid = #{customUuid} and pdate = #{date}")
//    List<AdsSjzlXsSalOrderdtl> getOrderByCustomUuid(String customUuid, LocalDate date);
}
